﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using AvalonDock.Layout;
using AutomationMLMapper.ViewModels.PaneViewModels;

namespace AutomationMLMapper.Controls.ConvertersAndTemplateSelectors
{
    class PanesTemplateSelector : DataTemplateSelector
    {
        public PanesTemplateSelector()
        {
        
        }
        
        public DataTemplate SupportedRolesViewTemplate
        {
            get;
            set;
        }

        public DataTemplate DifferntRolesViewTemplate
        {
            get;
            set;
        }
            

        public override System.Windows.DataTemplate SelectTemplate(object item, System.Windows.DependencyObject container)
        {
            var itemAsLayoutContent = item as LayoutContent;

            if (item is SupportedRolesViewModel)
                return SupportedRolesViewTemplate;
            else if (item is DifferentRolesViewModel)
                return DifferntRolesViewTemplate;

            return base.SelectTemplate(item, container);
        }
    }
}
